#pragma once

#include <cmath>
#include <memory>
#include "rtda/frame.h"
#include "native/registry.h"

namespace jvm {
    namespace lang {

        class FloatNative {
        private:
            static const std::string JL_FLOAT;

        public:
            static void init() {
                native::Registry::registerMethod(JL_FLOAT, "floatToRawIntBits",
                    "(F)I", &floatToRawIntBits);
                native::Registry::registerMethod(JL_FLOAT, "intBitsToFloat",
                    "(I)F", &intBitsToFloat);
            }

            static void floatToRawIntBits(std::shared_ptr<rtda::Frame> frame);
            static void intBitsToFloat(std::shared_ptr < rtda::Frame> frame);
        };

    } // namespace lang
} // namespace jvm